package com.liushao.client;

import com.liushao.client.impol.UserClientImpl;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * 用户客户端
 * @author huangshen
 */
@FeignClient(value = "how-user", fallback = UserClientImpl.class)
public interface UserClient {
    /**
     * 增加粉丝数
     * @param userid userid
     * @param x 数量
     */
    @RequestMapping(value="/user/user/incfans/{userid}/{x}",method= RequestMethod.POST)
    void incFanscount(@PathVariable("userid") String userid, @PathVariable("x") int x);
    /**
     * 增加关注数
     * @param userid userid
     * @param x 数量
     */
    @RequestMapping(value="/user/user/incfollow/{userid}/{x}",method=RequestMethod.POST)
    void incFollowcount(@PathVariable("userid") String userid,@PathVariable("x") int x);
}
